#!/bin/sh

ps aux | grep admin | awk '{print $2}' | xargs  kill

ps aux | grep customer | awk '{print $2}' | xargs  kill

ps aux | grep radiusd | awk '{print $2}' | xargs  kill

python toughctl -initdb -c ~/radiusd.conf 

python toughctl -radiusd -c ~/radiusd.conf & 

sleep 4

python toughctl -admin -c ~/radiusd.conf & 

sleep 4

python toughctl -customer -c ~/radiusd.conf & 

sleep 4

cd httptests/ && python alls.py

cd ../../

sleep 4

echo "print any key to exist:"

read var1

ps aux | grep admin | awk '{print $2}' | xargs  kill

ps aux | grep customer | awk '{print $2}' | xargs  kill

ps aux | grep radiusd | awk '{print $2}' | xargs  kill